//
//  IORNNTrainer.h
//  iornn-parser-c
//
//  Created by Phong Le on 25/12/14.
//  Copyright (c) 2014 Phong Le. All rights reserved.
//

#ifndef IORNNTrainer_h
#define IORNNTrainer_h

#include "IORNN.h"
#include "Param.h"
#include "Matrix.h"
#include "Utils.h"
#include "KBestTreebank.h"
#include <time.h>
#include <sys/time.h>
#include <unordered_set>
#include <iostream>
#include <iomanip>

using namespace std;

class IORNNTrainer {
public:
    
    Param *paramVarience;
    int nEvals;
    
    IORNNTrainer() { nEvals = 0; paramVarience = NULL;}
    
    void adagrad(IORNN* net, Param* grad, unordered_set<int>& tWords, unordered_set<int>& tPath);
    
    void train(IORNN* net, Treebank* tb, Treebank* devTb, KBestTreebank* kDevTb);
};

#endif
